package com.dt76.smallloanbackenduser.remote.etao;

import com.dt76.smallloanbackenduser.hystrix.etao.MenuHystrix;
import com.dt76.smallloanbackenduser.pojo.etao.Meun;
import com.dt76.smallloanbackenduser.utils.MenuList;
import com.dt76.smallloanbackenduser.utils.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "smallloan-backend-service",fallback = MenuHystrix.class)
public interface MenuRemote {

    //所有权限
    @RequestMapping("/getAllMenu")
    List<Meun> getAllMenu();


    //查rId下所有权限
    @RequestMapping("/getMenuByRId")
    List<String> getMenuByRId(@RequestParam("rId") Integer rId);


    @RequestMapping("/editMenuByRId")
    Result editMenu(@RequestBody MenuList menuList);

}
